home *** CD-ROM | disk | FTP | other *** search
- property PropMenuName, ListBackSprite, spriteNum
- global immutableItems, mutableItems, listItemNumber, listItemCount, menuName, menuLock, sShade, sDrop, menustate, flicker
-
- on getPropertyDescriptionList
- description = [:]
- addProp(description, #PropMenuName, [#default: EMPTY, #format: #string, #comment: "Menu Name:"])
- addProp(description, #ListBackSprite, [#default: -1, #format: #number, #comment: "List background Sprite:"])
- return description
- end
-
- on mouseEnter me
- if (menuLock <> EMPTY) and (menuName = PropMenuName) and (listItemNumber >= immutableItems.count) then
- sprite(spriteNum - 1).locH = sprite(spriteNum).left
- sprite(spriteNum - 1).locV = sprite(spriteNum).top
- end if
- end
-
- on mouseLeave me
- sprite(spriteNum - 1).locV = 0 - sprite(spriteNum - 1).height
- end
-
- on mouseDown me
- if (menuLock <> EMPTY) and (menuName = PropMenuName) and (listItemNumber >= immutableItems.count) then
- menustate = 5
- flicker = 0
- end if
- end
-
- on exitFrame me
- if menustate = 5 then
- if sprite(spriteNum - 1).locV < 0 then
- sprite(spriteNum - 1).locH = sprite(spriteNum).left
- sprite(spriteNum - 1).locV = sprite(spriteNum).top
- else
- sprite(spriteNum - 1).locV = 0 - sprite(spriteNum - 1).height
- end if
- flicker = flicker + 1
- if flicker > 4 then
- menustate = 0
- sprite(sShade).locV = 0 - sprite(sShade).height
- sprite(sDrop).locV = 0 - sprite(sDrop).height
- induhvidual = listItemNumber - immutableItems.count + 1
- deleteAt(mutableItems, induhvidual)
- writeItemListData()
- sendSprite(ListBackSprite, #deselectList)
- listItemCount = 0
- nom = EMPTY
- desc = EMPTY
- itype = EMPTY
- acc = EMPTY
- hand = EMPTY
- price = EMPTY
- repeat with i = 1 to immutableItems.count
- nom = nom & immutableItems[i].ItemName & RETURN
- desc = desc & immutableItems[i].Desc2 & RETURN
- itype = itype & immutableItems[i].ItemType & RETURN
- acc = acc & immutableItems[i].Account2 & RETURN
- hand = hand & immutableItems[i].Qty3 & RETURN
- price = price & immutableItems[i].Money2 & RETURN
- listItemCount = listItemCount + 1
- end repeat
- repeat with i = 1 to mutableItems.count
- nom = nom & mutableItems[i].ItemName & RETURN
- desc = desc & mutableItems[i].Desc2 & RETURN
- itype = itype & mutableItems[i].ItemType & RETURN
- acc = acc & mutableItems[i].Account2 & RETURN
- hand = hand & mutableItems[i].Qty3 & RETURN
- price = price & mutableItems[i].Money2 & RETURN
- listItemCount = listItemCount + 1
- end repeat
- member("Item List names").text = nom
- member("Item List description").text = desc
- member("Item List type").text = itype
- member("Item List account").text = acc
- member("Item List on hand").text = hand
- member("Item List price").text = price
- menuLock = EMPTY
- end if
- end if
- end
-